home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / WINFRESH.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1.2 KB  |  61 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // FusionWindow
  8. //
  9.  
  10. #include "fliwin.h"
  11. #include "colors.h"
  12.  
  13. #ifdef __BCPLUSPLUS__
  14. #pragma hdrstop
  15. #endif
  16.  
  17. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  18. //
  19. // RefreshWindows()
  20. //
  21. // Refreshes all of the windows
  22. //
  23. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  24.  
  25. void FusionWindow::RefreshWindows()
  26. {
  27.   if (!NumberOfWindows)
  28.     return;
  29.  
  30.   RemoveAllMenus();
  31.  
  32.   char *EntireWindow=
  33.     new char[Blaze.ComputeNeededBytes(Blaze.WhatWidth(),Blaze.WhatHeight())];
  34.  
  35.   Blaze.UseMemory(EntireWindow);
  36.   Blaze.CharacterFill(0,1,Blaze.WhatWidth(),Blaze.WhatHeight()-2,
  37.     Colors.WorkSpace,176);
  38.  
  39.   for (register int i=NumberOfWindows-1;i>=0;i--)
  40.   {
  41.     Windows[i]->Blaze.UseMemory(EntireWindow);
  42.     Windows[i]->ShowWindow();
  43.     Windows[i]->ShowInterior();
  44.     Windows[i]->Blaze.UseVideo();
  45.   }
  46.  
  47.   MouseHide();
  48.  
  49.   Blaze.BlockCopyVirtualToVisual(0,1,Blaze.WhatWidth(),Blaze.WhatHeight()-2,
  50.     EntireWindow);
  51.  
  52.   MouseShow();
  53.  
  54.   Blaze.UseVideo();
  55.  
  56.   delete EntireWindow;
  57.  
  58.   Windows[0]->Cursor();
  59. }
  60.  
  61.